// 重新包装一下方便直接从组件中拿到数据
export const singer = state => state.singer

export const playing = state => state.playing

export const fullScreen = state => state.fullScreen

export const playList = state => state.playList

export const sequenceList = state => state.sequenceList

export const mode = state => state.mode

export const currentIndex = state => state.currentIndex

// 获取当前播放歌曲
export const currentSong = (state) => {
  return state.playList[state.currentIndex] || {}
}
export const songsheet = state => state.songsheet

export const songsheettype = state => state.songsheetType

export const searchHistory = state => state.searchHistory

export const playOptions = state => state.playerOptions

export const playHistory = state => state.playHistory

export const favoriteList = state => state.favoriteList

export const favoriteListId = state => {
  let list = [];
  state.favoriteList.forEach(item => {
    list.push(item.id)
  });
  return list
}


// 登录模块：
export const isLogin = state => {
  return Object.keys(state.loginInfo).length>0;

}

export const userInfo = state => state.loginInfo

export const userLikeList=state=>state.userLikeList
